From: Giovanni Campagna Date: Mon, 28 Jan 2013 11:01:36 +0000 (+0100) Subject: Disconnect content-updated signal early X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5012 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cc60afa31a401e4b60f0f58fa945f8ca40a226d0;p=gnome-shell.git Disconnect content-updated signal early During the box pointer animation, other events can trigger an updateState, losing the information that the summary is hiding and thus never disconnecting the signals. Then, this stale connections can cause stacktraces, as they fire when summaryBoxPointerItem is null. https://bugzilla.gnome.org/show_bug.cgi?id=692693 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 861f32588..277b7e30b 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2613,6 +2613,20 @@ const MessageTray = new Lang.Class({ _onSummaryBoxPointerUngrabbed: function() { this._summaryBoxPointerState = State.HIDING; + + if (this._summaryBoxPointerContentUpdatedId) { + this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId); + this._summaryBoxPointerContentUpdatedId = 0; + } + if (this._summaryBoxPointerCloseClickedId != 0) { + this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId); + this._summaryBoxPointerCloseClickedId = 0; + } + if (this._sourceDoneDisplayingId) { + this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId); + this._sourceDoneDisplayingId = 0; + } + this._unlock(); if (this._summaryBoxPointerItem.source.notifications.length == 0) { @@ -2635,14 +2649,6 @@ const MessageTray = new Lang.Class({ this._summaryBoxPointerState = State.HIDDEN; this._summaryBoxPointer.bin.child = null; - this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId); - this._summaryBoxPointerContentUpdatedId = 0; - if (this._summaryBoxPointerCloseClickedId != 0) { - this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId); - this._summaryBoxPointerCloseClickedId = 0; - } - this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId); - this._summaryBoxPointerDoneDisplayingId = 0; let sourceNotificationStackDoneShowing = null; if (doneShowingNotificationStack) {